type token =
  | BOOL of (bool)
  | INT of (int)
  | FLOAT of (float)
  | NOT
  | MINUS
  | PLUS
  | EQUAL
  | LESS_EQUAL
  | GREATER_EQUAL
  | LESS
  | GREATER
  | IF
  | IDENT of (Id.t)
  | COMMA
  | DOT
  | SEMICOLON
  | LPAREN
  | RPAREN
  | EOF

open Parsing;;
# 2 "parser.mly"
(* parserが利用する変数、関数、型などの定義 *)
open Syntax
# 27 "parser.ml"
let yytransl_const = [|
  260 (* NOT *);
  261 (* MINUS *);
  262 (* PLUS *);
  263 (* EQUAL *);
  264 (* LESS_EQUAL *);
  265 (* GREATER_EQUAL *);
  266 (* LESS *);
  267 (* GREATER *);
  268 (* IF *);
  270 (* COMMA *);
  271 (* DOT *);
  272 (* SEMICOLON *);
  273 (* LPAREN *);
  274 (* RPAREN *);
    0 (* EOF *);
    0|]

let yytransl_block = [|
  257 (* BOOL *);
  258 (* INT *);
  259 (* FLOAT *);
  269 (* IDENT *);
    0|]

let yylhs = "\255\255\
\001\000\003\000\003\000\003\000\003\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\000\000"

let yylen = "\002\000\
\002\000\003\000\002\000\001\000\001\000\001\000\002\000\002\000\
\003\000\003\000\003\000\003\000\003\000\003\000\003\000\001\000\
\002\000"

let yydefred = "\000\000\
\000\000\000\000\016\000\004\000\005\000\000\000\000\000\000\000\
\017\000\000\000\006\000\007\000\008\000\003\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\001\000\002\000\
\010\000\009\000\000\000\000\000\000\000\000\000\000\000"

let yydgoto = "\002\000\
\009\000\010\000\011\000"

let yysindex = "\002\000\
\006\255\000\000\000\000\000\000\000\000\006\255\006\255\000\255\
\000\000\040\255\000\000\000\000\000\000\000\000\026\255\006\255\
\006\255\006\255\006\255\006\255\006\255\006\255\000\000\000\000\
\000\000\000\000\007\255\007\255\007\255\007\255\007\255"

let yyrindex = "\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\050\255\062\255\074\255\086\255\098\255"

let yygindex = "\000\000\
\000\000\008\000\000\000"

let yytablesize = 116
let yytable = "\003\000\
\004\000\005\000\001\000\006\000\007\000\003\000\004\000\005\000\
\000\000\006\000\007\000\016\000\017\000\012\000\013\000\015\000\
\008\000\014\000\000\000\000\000\000\000\000\000\008\000\025\000\
\026\000\027\000\028\000\029\000\030\000\031\000\016\000\017\000\
\018\000\019\000\020\000\021\000\022\000\000\000\000\000\000\000\
\000\000\000\000\000\000\024\000\016\000\017\000\018\000\019\000\
\020\000\021\000\022\000\000\000\000\000\000\000\000\000\023\000\
\011\000\011\000\011\000\011\000\011\000\000\000\000\000\000\000\
\000\000\011\000\000\000\011\000\014\000\014\000\014\000\014\000\
\014\000\000\000\000\000\000\000\000\000\014\000\000\000\014\000\
\015\000\015\000\015\000\015\000\015\000\000\000\000\000\000\000\
\000\000\015\000\000\000\015\000\012\000\012\000\012\000\012\000\
\012\000\000\000\000\000\000\000\000\000\012\000\000\000\012\000\
\013\000\013\000\013\000\013\000\013\000\000\000\000\000\000\000\
\000\000\013\000\000\000\013\000"

let yycheck = "\000\001\
\001\001\002\001\001\000\004\001\005\001\000\001\001\001\002\001\
\255\255\004\001\005\001\005\001\006\001\006\000\007\000\008\000\
\017\001\018\001\255\255\255\255\255\255\255\255\017\001\016\000\
\017\000\018\000\019\000\020\000\021\000\022\000\005\001\006\001\
\007\001\008\001\009\001\010\001\011\001\255\255\255\255\255\255\
\255\255\255\255\255\255\018\001\005\001\006\001\007\001\008\001\
\009\001\010\001\011\001\255\255\255\255\255\255\255\255\016\001\
\007\001\008\001\009\001\010\001\011\001\255\255\255\255\255\255\
\255\255\016\001\255\255\018\001\007\001\008\001\009\001\010\001\
\011\001\255\255\255\255\255\255\255\255\016\001\255\255\018\001\
\007\001\008\001\009\001\010\001\011\001\255\255\255\255\255\255\
\255\255\016\001\255\255\018\001\007\001\008\001\009\001\010\001\
\011\001\255\255\255\255\255\255\255\255\016\001\255\255\018\001\
\007\001\008\001\009\001\010\001\011\001\255\255\255\255\255\255\
\255\255\016\001\255\255\018\001"

let yynames_const = "\
  NOT\000\
  MINUS\000\
  PLUS\000\
  EQUAL\000\
  LESS_EQUAL\000\
  GREATER_EQUAL\000\
  LESS\000\
  GREATER\000\
  IF\000\
  COMMA\000\
  DOT\000\
  SEMICOLON\000\
  LPAREN\000\
  RPAREN\000\
  EOF\000\
  "

let yynames_block = "\
  BOOL\000\
  INT\000\
  FLOAT\000\
  IDENT\000\
  "

let yyact = [|
  (fun _ -> failwith "parser")
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 1 : 'exp) in
    Obj.repr(
# 46 "parser.mly"
    ( Statement(_1) )
# 154 "parser.ml"
               : Syntax.statement))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 1 : 'exp) in
    Obj.repr(
# 50 "parser.mly"
    ( _2 )
# 161 "parser.ml"
               : 'simple_exp))
; (fun __caml_parser_env ->
    Obj.repr(
# 52 "parser.mly"
    ( Unit )
# 167 "parser.ml"
               : 'simple_exp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : bool) in
    Obj.repr(
# 54 "parser.mly"
    ( Bool(_1) )
# 174 "parser.ml"
               : 'simple_exp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : int) in
    Obj.repr(
# 56 "parser.mly"
    ( Int(_1) )
# 181 "parser.ml"
               : 'simple_exp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_exp) in
    Obj.repr(
# 60 "parser.mly"
    ( _1 )
# 188 "parser.ml"
               : 'exp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'exp) in
    Obj.repr(
# 63 "parser.mly"
    ( Not(_2) )
# 195 "parser.ml"
               : 'exp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'exp) in
    Obj.repr(
# 66 "parser.mly"
    ( match _2 with
    | e -> Neg(e) )
# 203 "parser.ml"
               : 'exp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'exp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'exp) in
    Obj.repr(
# 69 "parser.mly"
    ( Add(_1, _3) )
# 211 "parser.ml"
               : 'exp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'exp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'exp) in
    Obj.repr(
# 71 "parser.mly"
    ( Sub(_1, _3) )
# 219 "parser.ml"
               : 'exp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'exp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'exp) in
    Obj.repr(
# 73 "parser.mly"
    ( Eq(_1, _3) )
# 227 "parser.ml"
               : 'exp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'exp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'exp) in
    Obj.repr(
# 75 "parser.mly"
    ( Not(LE(_3, _1)) )
# 235 "parser.ml"
               : 'exp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'exp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'exp) in
    Obj.repr(
# 77 "parser.mly"
    ( Not(LE(_1, _3)) )
# 243 "parser.ml"
               : 'exp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'exp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'exp) in
    Obj.repr(
# 79 "parser.mly"
    ( LE(_1, _3) )
# 251 "parser.ml"
               : 'exp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'exp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'exp) in
    Obj.repr(
# 81 "parser.mly"
    ( LE(_3, _1) )
# 259 "parser.ml"
               : 'exp))
; (fun __caml_parser_env ->
    Obj.repr(
# 83 "parser.mly"
    ( failwith
	(Printf.sprintf "parse error near characters %d-%d"
	   (Parsing.symbol_start ())
	   (Parsing.symbol_end ())) )
# 268 "parser.ml"
               : 'exp))
(* Entry statement *)
; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0)))
|]
let yytables =
  { Parsing.actions=yyact;
    Parsing.transl_const=yytransl_const;
    Parsing.transl_block=yytransl_block;
    Parsing.lhs=yylhs;
    Parsing.len=yylen;
    Parsing.defred=yydefred;
    Parsing.dgoto=yydgoto;
    Parsing.sindex=yysindex;
    Parsing.rindex=yyrindex;
    Parsing.gindex=yygindex;
    Parsing.tablesize=yytablesize;
    Parsing.table=yytable;
    Parsing.check=yycheck;
    Parsing.error_function=parse_error;
    Parsing.names_const=yynames_const;
    Parsing.names_block=yynames_block }
let statement (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) =
   (Parsing.yyparse yytables 1 lexfun lexbuf : Syntax.statement)
